package b3.widget.task
{
	import b3.model.*;
	import b3.net.*;
	import b3.util.*;
	import b3.config.*;
	
	import flash.display.*;
	import flash.filters.*;
	import flash.geom.*;
	import flash.text.*;

	public class TaskMessage extends Sprite
	{
		public function TaskMessage(taskId:int)
		{
			super();
			var PopoutMsgBgr:Class = ResourceHelper.getInstance().getClassByName("PopoutMsgBgr");
			var mainSprite:Sprite = new PopoutMsgBgr();
			mainSprite.alpha = 0.6;
			addChild(mainSprite);

			var taskConfig:TaskConfig = Config.taskConfigs[taskId];
			var textField:TextField = new TextField();
			textField.selectable = false;
        	textField.autoSize = TextFieldAutoSize.CENTER;
			textField.defaultTextFormat = new TextFormat(BFont.fontName, 15, 0xFFFFFF, true);
			textField.filters = [new GlowFilter(0x00AAFF, 1, 1.3, 1.3, 100, BitmapFilterQuality.HIGH)];
			textField.x = 50;
			textField.text = taskConfig.name;
			textField.y = (this.height - textField.height) / 2;
			addChild(textField);
		}
	}
}